﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MWRCommunicationLibrary
{
    public abstract class DecodorFactory
    {
        public static IDecodor GetDecodor()
        {
            if(string.IsNullOrEmpty(Common.DeciveModelCode))
            {
                throw new Exception("No Model Selected Exception : To Decode Data, Need To Set Rader Model Code First.");
            }

            switch(Common.DeciveModelCode)
            {
                case "ARS408":
                    return new MWRCommunicationLibrary.ARS408.Decodor();
                default:
                    throw new Exception("Model Code Fail To Recognized");
            }
        }
    }
}
